<template>
  <div>
    <el-table :data="skill_list" style="width: 100%">
      <el-table-column
        prop="name"
        label="名称"
      />
      <el-table-column
        prop="level"
        label="等级"
      >
        <template slot-scope="{row}">
          <span>{{ row.level }}/{{ row.max_level }}</span>
        </template>
      </el-table-column>
      <el-table-column
        prop="exp"
        label="当前经验"
      />
      <el-table-column
        prop="gap"
        label="剩余经验"
      />
    </el-table>
  </div>
</template>

<script>
export default {
  name: 'Bank',
  props: {
    skillList: {
      required: true,
      type: Array
    }
  },
  data() {
    return {
      skill_list: this.skillList,
    }
  },
  watch: {
    skillList: function() {
      this.skill_list = this.skillList
    }
  }
}
</script>
